import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '会计期间',
    align: "center",
    dataIndex: 'accountingPeriod'
  },
  {
    title: '期间状态',
    align: "center",
    dataIndex: 'periodStatus',
    customRender: ({ text }) => {
      return text == 0 ? '未关闭' : text == 1 ? '已关闭' : ''
    },
  },
  {
    title: '操作人',
    align: "center",
    dataIndex: 'operatorName'
  },
  {
    title: '	操作时间',
    align: "center",
    dataIndex: 'operatorTime'
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "年度",
    field: 'accountingYear',
    component: 'DatePicker',
    colProps: { span: 3 },
    componentProps: {
      picker: 'year',
      showTime: false,
      valueFormat: 'YYYY'
    },
  },
];
//表单数据
export const formSchema: FormSchema[] = [

];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[] {
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}